<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改分销积分设定')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bonus-edit" th:object="${reBonus}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">账户性质：</label>
                <div class="col-sm-8">

                    <div class="radio-box" th:each="dict : ${@dict.getType('account_type')}">
                        <input type="radio" th:id="${'accountType_' + dict.dictCode}" name="accountType" th:value="${dict.dictValue}" th:field="*{accountType}" required>
                        <label th:for="${'accountType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>

                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-3 control-label">一级分销奖励积分：</label>
                <div class="col-sm-8">
                    <input name="gbonus" th:field="*{gbonus}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">二级分销奖励积分：</label>
                <div class="col-sm-8">
                    <input name="fbonus" th:field="*{fbonus}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/bonus";
        $("#form-bonus-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-bonus-edit').serialize());
            }
        }
    </script>
</body>
</html>